package com.piz.model;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.validator.constraints.NotEmpty;



/**
 * @author prameetk.sharma
 *
 */
@Entity
@Table(name="offer")
public class OfferCoupon implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Long id;
	private String couponCode;
	private Timestamp createdDate;
	private Double discount;
	private Timestamp couponStart;
	private Timestamp couponEnd;
	private Integer status;
	private String description;
	private Double discountAmt;
	
	
	

	
	/**
	 * 
	 */
	public OfferCoupon() {
		super();
		// TODO Auto-generated constructor stub
	}



	/**
	 * @param couponCode
	 * @param createdDate
	 * @param discount
	 * @param couponStart
	 * @param couponEnd
	 * @param status
	 * @param description
	 */
	public OfferCoupon(String couponCode, Timestamp createdDate,
			Double discount, Timestamp couponStart, Timestamp couponEnd,
			Integer status, String description) {
		this.couponCode = couponCode;
		this.createdDate = createdDate;
		this.discount = discount;
		this.couponStart = couponStart;
		this.couponEnd = couponEnd;
		this.status = status;
		this.description = description;
	}



	/**
	 * @return
	 */
	@Id
    @GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="ID")
	public Long getId() {
		return id;
	}


	/**
	 * @param id
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return
	 */
	@NotEmpty
	@Column(name="COUPON_CODE")
	public String getCouponCode() {
		return couponCode;
	}


	/**
	 * @param couponCode
	 */
	public void setCouponCode(String couponCode) {
		this.couponCode = couponCode;
	}

	/**
	 * @return
	 */
	@Column(name="CREATED_AT")
	public Timestamp getCreatedDate() {
		return createdDate;
	}


	/**
	 * @param createdDate
	 */
	public void setCreatedDate(Timestamp createdDate) {
		this.createdDate = createdDate;
	}

	/**
	 * @return
	 */
	@Column(name="DISCOUNT")
	public Double getDiscount() {
		return discount;
	}


	/**
	 * @param discount
	 */
	public void setDiscount(Double discount) {
		this.discount = discount;
	}

	/**
	 * @return
	 */
	@Column(name="COUPON_END")
	public Timestamp getCouponStart() {
		return couponStart;
	}


	/**
	 * @param couponStart
	 */
	public void setCouponStart(Timestamp couponStart) {
		this.couponStart = couponStart;
	}

	/**
	 * @return
	 */
	@Column(name="COUPON_START")
	public Timestamp getCouponEnd() {
		return couponEnd;
	}


	/**
	 * @param couponEnd
	 */
	public void setCouponEnd(Timestamp couponEnd) {
		this.couponEnd = couponEnd;
	}

	/**
	 * @return
	 */
	@Column(name="STATUS")
	public Integer getStatus() {
		return status;
	}


	/**
	 * @param status
	 */
	public void setStatus(Integer status) {
		this.status = status;
	}

	
	/**
	 * @return
	 */
	@Column(name="DESCRIPTION")
	public String getDescription() {
		return description;
	}


	/**
	 * @param description
	 */
	public void setDescription(String description) {
		this.description = description;
	}



	/**
	 * @return the Double discountAmt
	 */
	@Transient
	public Double getDiscountAmt() {
		return discountAmt;
	}



	/**
	 * @param discountAmt Double the discountAmt to set
	 */
	public void setDiscountAmt(Double discountAmt) {
		this.discountAmt = discountAmt;
	}
	
	
	
	

}
